<template>
	<div>
		<el-card class="box-card">
			<div class="text item">
				<div class="hoverdivClass" v-for="(value, key) in propertyList" :key="key">
					<el-form ref="form" v-if="titleList[key]" label-position="left">
						<el-form-item :label="titleList[key]">
							<el-input v-model="propertyList[key]" type="textarea"></el-input>
						</el-form-item>
					</el-form>
				</div>
			</div>
		</el-card>
	</div>
</template>
<script>
export default {
	props: {
		getData: {
			type: Function,
			default: Function
		}
	},
	data() {
		return {
			titleList: {
				isRiskMeasures: '是否有风控措施：预警、止损、最大回撤及其他风控措施等',
				investLeverRate: '投资杠杆率上限（总资产/净资产）%',
				earlyWarnLine: '有无预警线',
				earlyWarnLineType: '预警线类型',
				earlyWarnNetWorth: '预警线对应的资产管理计划净值',
				stopLossLine: '有无止损线',
				stopLossLineType: '止损线类型',
				stopLossNetWorth: '止损线对应的资产管理计划净值',
				maxRetreat: '有无回撤预警线',
				retreatWarnLineType: '回撤预警线类型',
				retreatEarlyWarnNetWorth: '回撤预警线对应的资产管理计划净值',
				stopLossWarningLine: '有无回撤止损线',
				retreatStopLossLineType: '回撤止损线类型',
				retreatStopLossNetWorth: '回撤止损线对应的资产管理计划净值',
				otherRiskStep: '有无其他风控措施',
				otherRiskExpression: '其他风控措施-合同表述',
				managerIsInvestment: '管理人是否投入资金',
				managerInvestmentAmount: '管理人投入资金参与金额',
				managerInvestmentRatio: '管理人投入资金参与比例',
				managerIsPartake: '管理人附属机构自有资金是否参与',
				managerPartakeAmount: '管理人及其附属机构自有资金参与金额（万元）',
				managerPartakeRatio: '管理人及其附属机构自有资金参与比例（%）'
			},
			propertyList: {
				isRiskMeasures: '',
				investLeverRate: '',
				earlyWarnLine: '',
				earlyWarnLineType: '',
				earlyWarnNetWorth: '',
				stopLossLine: '',
				stopLossLineType: '',
				stopLossNetWorth: '',
				maxRetreat: '',
				retreatWarnLineType: '',
				retreatEarlyWarnNetWorth: '',
				stopLossWarningLine: '',
				retreatStopLossLineType: '',
				retreatStopLossNetWorth: '',
				otherRiskStep: '',
				otherRiskExpression: '',
				managerIsInvestment: '',
				managerInvestmentAmount: '',
				managerInvestmentRatio: '',
				managerIsPartake: '',
				managerPartakeAmount: '',
				managerPartakeRatio: ''
			}
		}
	},
	methods: {
		saveSetings() {
			return this.propertyList
		},
		edit(data) {
			const obj = JSON.parse(JSON.stringify(data))
			this.propertyList = { ...this.propertyList, ...obj }
			for (const i in this.propertyList) {
				if (!this.propertyList[i]) {
					this.propertyList[i] = ''
				}
			}
		}
	}
}
</script>
<style lang="scss" scoped >
</style>
